package com.itheima.service.impl;

import com.itheima.dao.AccountDao;
import com.itheima.domain.Account;
import com.itheima.service.AccountService;

import java.util.List;

/**
 * @program: Spring_day01_01_IOC入门程序
 * @description:
 * @author: xuejingjing
 * @create: 2021-07-25 11:54
 **/
public class AccountServiceImpl implements AccountService {

    //注入
    private AccountDao accountDao;

    //2.提供set方法
    public void setAccountDao(AccountDao accountDao) {
        this.accountDao = accountDao;
    }

    public void save(Account account) {
        accountDao.save(account);

    }

    public void delete(Integer id) {
        accountDao.delete(id);

    }

    public void update(Account account) {

    }

    public List<Account> findAll() {
       return accountDao.findAll();

    }

    public Account findById(Integer id) {
        return accountDao.findById(id);

    }

}
